<link rel="stylesheet" type="text/css" href="assets/plugins/H-ui_v3.1.1/lib/icheck/icheck.css"/>

<form class="site-selection-form form form-horizontal" id="siteSelectForm">
	
	<!--此处承接不同的供应方表单-->
	<div id="differentSupply" class="different-supply"></div>
	<!--此处承接不同的供应方表单end-->
	
	
	<!--以下为供应方通用模块-->
	<div class="supply-side">
		<div class="row cl">
			<div class="formControls per100">
				<span class="cut-off per100"></span>
			</div>
		</div>
		<div class="row cl">
			<span class="form-label per15">
				资源标题：
			</span>
			<div class="formControls per40">
				<input type="text" name="" class="input-text size-M">
			</div>
		</div>
		<div class="row cl">
			<span class="form-label per15">
				资源说明：
			</span>
			<div class="formControls per75">
				<textarea class="textarea"></textarea>
			</div>
		</div>
		<div class="row cl">
			<span class="form-label per15">
				具体地址：
			</span>
			<div class="formControls per80">
				<span class="f-l per50">
					<input type="text" name="" class="input-text size-M">
				</span>
				<span class="f-l ml-10">
					<button type="button" class="btn btn-primary-outline radius">标注位置</button>
				</span>
			</div>
		</div>
		<div class="row cl">
			<span class="form-label per15">
				资源图片：
			</span>
			<div class="formControls per75">
				<div class="f-l up-img-btn">
					<span class="btn-upload">
					  	<a href="javascript:void();" class="btn btn-primary radius">
					  		<i class="Hui-iconfont Hui-iconfont-upload"></i> 选择图片
					  	</a>
					  	<input type="file" multiple name="file_0" class="input-file">
					</span>
					<p class="c-primary">图片格式:GIF、JPG、JPEG、PNG,最适合尺寸120*120 像素</p>
					<div>
						<img src="images/user-face.gif"/>
						<img src="images/user-face.gif"/>
						<img src="images/user-face.gif"/>
					</div>
				</div>
			</div>
		</div>
		<div class="row cl">
			<div class="formControls per100">
				<span class="cut-off per100"></span>
			</div>
		</div>
		<div class="row cl">
			<span class="form-label per15">
				联系人：
			</span>
			<div class="formControls per40">
				<input type="text" name="user" class="input-text size-M">
			</div>
		</div>
		<div class="row cl">
			<span class="form-label per15">
				联系电话：
			</span>
			<div class="formControls per80">
				<span class="f-l per50">
					<input type="text" name="phone" class="input-text size-M">
				</span>
				<span class="f-l c-primary ml-10">
					请保持电话畅通,以免错失业务
				</span>
			</div>
		</div>
		<div class="row cl">
			<span class="form-label per15">
				联系QQ：
			</span>
			<div class="formControls per40">
				<input type="text" name="qq" class="input-text size-M">
			</div>
		</div>	
	</div>
	<!--以下为供应方通用模块end-->
	
	<div class="row cl">
		<span class="form-label per15">
			
		</span>
		<div class="formControls per75">
			<button type="submit" class="btn btn-primary radius">发布信息</button>
		</div>
	</div>
</form>


<script type="text/javascript" src="assets/plugins/H-ui_v3.1.1/lib/icheck/jquery.icheck.min.js"></script>
<script type="text/javascript" src="assets/plugins/H-ui_v3.1.1/lib/jquery.validation/jquery.validate.min.js"></script>
<script type="text/javascript" src="assets/plugins/H-ui_v3.1.1/lib/jquery.validation/additional-methods.min.js"></script>
<script type="text/javascript" src="assets/plugins/H-ui_v3.1.1/lib/jquery.validation/messages_zh.js"></script>

<script type="text/javascript" src="assets/plugins/jquery/jsrender.min.js"></script>

<script type="text/javascript">
	$(function(){
		var currentParam=location.hash.slice(1).split("?")[1];
		var paramObj=JSON.parse(currentParam.split("=")[1]);
		$.get("templates/vip/publish/templateSupply.html", function(result){
			var template=$.templates(result);
			var html=template.render(paramObj);
			$("#differentSupply").html(html);
			
			$('.row input').iCheck({
				checkboxClass: 'icheckbox-blue',
				radioClass: 'iradio-blue',
				increaseArea: '20%'
			})
		});
		
		//表单验证
		$("#siteSelectForm").validate({
			rules:{
				
			},
			onkeyup:false,
			submitHandler:function(form){
				debugger
			},
			errorPlacement:function(error,element){
				error.appendTo(element.parents('.error-parent'));
			}
		});
	});
</script>